package com.yx.musicplayer.ui.activity;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.view.View;

import com.yx.baselibrary.widget.TitleBarView;
import com.yx.baselibrary.widget.XViewPager;
import com.yx.musicplayer.R;
import com.yx.musicplayer.ui.adapter.VpAdapter;
import com.yx.musicplayer.ui.base.BaseActivity;

import butterknife.BindView;

/**
 * Created by yx on 2017/11/1 0001.
 */

public class LocalMusicActivity extends BaseActivity {
    @BindView(R.id.tabLayout)
    TabLayout tabLayout;
    @BindView(R.id.viewPager)
    XViewPager viewPager;
    @BindView(R.id.topBar)
    TitleBarView topBar;

    private String tabTitles[] = new String[]{"单曲", "歌手", "专辑", "文件夹"};


    @Override
    public void before(Bundle savedInstanceState) {
    }

    @Override
    public void initViewAndEvent() {
        showQuickControl(true);
        VpAdapter adapter = new VpAdapter(tabTitles, getSupportFragmentManager());
        viewPager.setAdapter(adapter);
        viewPager.setOffscreenPageLimit(tabTitles.length);
        tabLayout.setupWithViewPager(viewPager);
    }

    @Override
    public int getContentViewLayoutID() {
        return R.layout.activity_local_music;
    }

    @Override
    public View getLoadingTargetView() {
        return null;
    }


}
